import React, {Component} from "react";
import {StyleSheet, View, Animated, Image, Dimensions, BackHandler, ToastAndroid, StatusBar} from "react-native";
import {StackNavigator, TabNavigator, TabBarBottom} from "react-navigation";
import ImageButton from '../../common/widget/CustomButton'
import color from '../../util/color'
export default class CourseScene extends Component {

    static navigationOptions = ({navigation}: any) => ({
        headerTintColor: 'white',
        title: '我的课程',
        headerStyle: {backgroundColor: color.globalMainColor},
        headerRight: <ImageButton onPress={()=>{ navigation.navigate('calendarSecene')
        }} style={{marginRight:12}} source={require('../../../res/img/select/select_rili_icon.png')}/>
    })

    constructor() {
        super()
        StatusBar.setBarStyle('light-content')
    }

    render() {
        return (
            <View style={{flex:1,backgroundColor:'purple'}}>

            </View>
        );
    }

    componentDidMount() {
        fetch('https://i.jkzaixian.com/api/rest/smscode/', {
            method: "POST",
            headers: {
                'Accept': 'application/json',
                'Content-Type': 'application/json',
            },
            body: JSON.stringify({mobile: '15011518253', for: 'register'})
        })
            .then((response) => { // 数据解析方式
                console.log('response' + response)
            })
            .then((responseData) => { // 获取到的数据处理
                console.log('responseData' + responseData)
            })
            .catch((error) => { // 错误处理
            })
            .done()
    }
}

